//获取当前时间前一个月
function getStartDate() {
	let d = new Date();
	d.setMonth(d.getMonth() - 1);
	let year = d.getFullYear()
	let month = d.getMonth() + 1
	let date = d.getDate()
	if (month < 10) {
		month = '0' + month
	}
	if (date < 10) {
		date = '0' + date
	}
	return year + '-' + (month) + '-' + date
}
//获取当前时间
function getEndDate() {
	let d = new Date();
	let year = d.getFullYear()
	let month = d.getMonth() + 1
	let date = d.getDate()
	if (month < 10) {
		month = '0' + month
	}
	if (date < 10) {
		date = '0' + date
	}
	return year + '-' + (month) + '-' + date
}

export default {
	getStartDate,
	getEndDate,
}